<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn(n){
            for(var i=1; i<100; i++){
                var a,b;
                a = i%10; // 个位数
                b = parseInt(i/10); //十位数
                if(a==n || b==n || i%n==0){
                    document.write('过 ');
                    continue;
                }
                document.write(i+' ');
            }
        }
        var k = Number(prompt('输出逢几过的数字'));
        fn(k);
    </script>
</body>
</html>